#!/usr/local/python3/bin/python3.8
# -*- encoding: utf-8 -*-
'''
@File    :   序列化.py    
@Contact :   tt_candy@outlook.com
@License :   仅供非生产环境使用
@Desciption: None
@Creation time：20/12/24 6:40

@Modify Time      @Author    @Version    @Modify action
------------      -------    --------    -----------
   None           ttcandy      1.0         None  
'''

# import json
# s={"大大":"是吗"}
# with open("jd.txt","a",encoding="UTF-8") as f:
#     json.dump(s,f,ensure_ascii=False)
#

# with open("jd.txt","r",encoding="UTF-8") as f:
#     dic=json.load(f)
#     print(dic)

# with open("jd.txt","a",encoding="UTF-8") as f:
#     f.write(json.dumps(s,ensure_ascii=False)+"\n")

import pickle

s={"大大":"是吗"}

pkd=pickle.dumps(s)
print(pkd)

pkl=pickle.loads(pkd)
print(pkl)